package edu.spec.lyq.week08.class1.book.unit4.one;

/**
 * \* User: lyq
 * \* Date: 2018/10/18
 * \* Time: 18:48
 * \* Description:
 */
public class Cylinder extends Circle{
    private double hight; //y
    public Cylinder(double r,double h){
        super(r);
        this.hight = h;
    }
    public double getVolume(){
        return super.getArea() * hight;
    }
    public void showVolume(){
        System.out.println("圆柱的体积: " + this.getVolume());
    }

}
